package com.doordu.soa.service.comm.constant;
/**
 * 系统常用常量类
 * @ClassName: Constant
 * @Description: 
 * @author xiaoqun.yi yixq@doordu.com  
 * @date 2017年4月6日 下午5:51:26
 * @version V1.0
 */
public class Constant {
	/***
	 * 默认redis的前缀,本系统内的所有缓存都应该附带此前缀.
	 */
	public static final String REDIS_PREFIX = "doordu_soa:";
	/**
	 * 分页，默认页面大小
	 */
	public static final Integer LIMIT_DEFAULT = 25;

	public static final String RESUBMIT_TOKEN = "resubmitToken_:";

	/** 文件上传常量短信验证 */
	public static final String STARTUPLOAD = "startupload_:";

	/** token有效期 */
	public static final int TOKEN_EXPIRES_HOUR = 1;
	
	public static final int LOGIN_TOKEN_EXPIRES_SECOND = 60*20;
	
	/**
	 * 房东角色ID
	 */
	public static final int LANDLOAD_ROLE_ID = 3330;
	/**
	 * 民族字典类型
	 */
	public static final String DICT_TYPE_MZ = "mz";

	/**
	 * 平台代码
	 */
	public static final int DD_PLAT_WG = 1;// 物管
	public static final int DD_PLAT_ZHZL = 2;// 综合治理
	public static final int DD_PLAT_YY = 3;// 运营平台
	public static final int DD_PLAT_BSH = 4;// 伴生活

	/***
	 * 用户操作数据库类型
	 */
	public static final int DB_DML_INSERT = 1;// 增加
	public static final int DB_DML_UPDATE = 2;// 修改
	public static final int DB_DML_DELETE = 3;// 删除
	public static final int DB_DML_SELECT = 4;// 查询

	public static final int DATA_FILE_IMPORT = 1;// 导入
	public static final int DATA_FILE_EXPORT = 2;// 导出
	
	/***
	 * 用户开卡
	 */
	//start
	public static final int USER_CARD_ISIDENTIFYCARDFLAG_OPEN = 1;//身份信息开启
	public static final int USER_CARD_ISIDENTIFYCARDFLAG_CLOSE = 0;//身份信息关闭
	
	public static final int USER_CARD_ISUSERAPPFLAG_OPEN = 1;//APP授权开启
	public static final int USER_CARD_ISUSERAPPFLAG_CLOSE = 0;//APP授权关闭
	
	public static final int USER_CARD_ISICCARDFLAG_OPEN = 1;//用户是否要开门禁卡 开启
	public static final int USER_CARD_ISICCARDFLAG_CLOSE = 0;//用户是否要开门禁卡 关闭
	
	public static final int USER_CARD_ISPLANFAMILYFLAG_OPEN = 1;//计划生育记录标志  开启
	public static final int USER_CARD_ISPLANFAMILYFLAG_CLOSE = 0;//计划生育记录标志  关闭
	
	public static final int USER_CARD_ISMOREINFO_OPEN = 1;//更多信息记录标志  开启
	public static final int USER_CARD_ISMOREINFO_CLOSE = 0;//更多信息记录标志  关闭

	public static final int USER_SELF_AUTH_APPROVED = 1;//自助授权通过
	public static final int USER_SELF_AUTH_REJECTED = 2;//自助授权拒绝
	public static final int USER_CARD_REQUEST = 2;//授权的同时申请开卡
	public static final int SELF_AUTH_TIME_LIMITED = 1;//App授权有时间限制
	public static final int SELF_AUTH_TIME_UNLIMITED = 0;//App授权无时间限制
	public static final int USER_CARD_CREATED = 1; //已开卡 //room_binding_identifier.bind_type_id
	public static final int USER_CARD_ONLY_IDCARD = 0; //只有登记身份证卡

	//数据库中已存在该条数据
	public static final String USER_CARD_RESULT_CODE_200 = "200";
	public static final String USER_CARD_RESULT_CODE_110001 = "110001";
	public static final String USER_CARD_RESULT_MSG_110001 = "该卡号已存在，不能进行开卡操作！";
	public static final String USER_CARD_RESULT_CODE_110002 = "110002";
	public static final String USER_CARD_RESULT_MSG_110002 = "传入的guid错误,查不到对应设备信息！";
	//end
	
	/***
	 * 用户卡状态变更
	 */
	//start
	public static final int USER_CARD_STATUS_OPEN = 1;//启用
	public static final Short USER_CARD_STATUS_OPEN_VAL = 1;//启用状态值
	public static final int USER_CARD_STATUS_PAUSE = 2;//暂停
	public static final Short USER_CARD_STATUS_PAUSE_VAL = 2;//暂停状态值
	public static final int USER_CARD_STATUS_NOCARD_CLOSE = 3;//无卡注销
	public static final int USER_CARD_STATUS_HASCARD_CLOSE = 4;//有卡注销
	public static final Short USER_CARD_STATUS_CLOSE_VAL = 20;//注销状态值
	public static final Short USER_CARD_STATUS_RENEWAL = 5;//续卡
	
	
	public static final int USER_CARD_IDENTIFY_RECORD_RECORD_CHANNEL = 1;//身份信息读卡录入

    /**
     * 门禁机和门禁卡相关的常量
     */
    public static final int USER_CARD_IC = 5;//IC卡
    public static final int USER_CARD_ID = 11;//身份证卡
	public static final int USER_CARD_ADMIN = 1;//管理卡

    public static final int USER_CARD_MANAGE = 1;
    public static final int USER_CARD_COMMON = 0;

    public static final int USER_CARD_DEL = 0;//卡已删除
    public static final int USER_CARD_ENABLE = 1;//卡启用
    public static final int USER_CARD_DISABLE = 2;//卡禁用
    public static final int USER_CARD_CANCEL = 20;//卡注销
    
    //对卡执行的操作(长度1) 0.删除 1.白名单 2.黑名单 3.梯控
    public static final short USER_CARD_ACTION_DEL = 0;//删除
    public static final short USER_CARD_ACTION_WHITE = 1;//白名单
    public static final short USER_CARD_ACTION_BLACK = 2;//黑名单
    public static final short USER_CARD_ACTION_TIKONG = 3;//梯控

    public static final int EMERGENCY_ROOM = 10; //应急房
    //end

	public static final short USER_RZZT_IN = 1;//入住
	public static final short USER_RZZT_GONE = 2;//搬离

	/**维修类型，1-替换*/
	public static final Integer REPAIR_TYPE_REPLACE = 1;
	/**维系类型，2-解绑*/
	public static final Integer REPAIR_TYPE_UNBIND = 2;
	/**
	 * 绑定类型：用户
	 */
	public static final int DEVICE_BINDING_TYPE_USER = 2;
	/**
	 * 绑定类型：房间号
	 */
	public static final int DEVICE_BINDING_TYPE_ROOM = 1;

	/**
	 * 门禁机在线
	 */
	public static final int DEVICE_ONLINE = 1;
	/**
	 * 门禁机离线
	 */
	public static final int DEVICE_OFFLINE = -1;
	/**
	 * 门禁机不限在/离线
	 */
	public static final int DEVICE_ALLLINE = 0;
    public static final int OPENDOOR_TYPE_CARD = 1;
    public static final int OPENDOOR_TYPE_APP = 2;
    public static final int OPENDOOR_TYPE_CALL = 3;
    public static final int OPENDOOR_TYPE_PASS = 4;
    public static final String SESSION_ID="sessionId";
	//消息常量定义
	public static final int MSG_TYPE_CARD_EXPIRED = 1;//卡即将过期类型
	public static final int MSG_TYPE_OWNER_CONTACT = 2;//业主联系物业类型
	public static final int MSG_TYPE_DEVICE_OFFLINE = 3;//设备离线类型
	public static final int MSG_TYPE_EARLY_WARNING = 4;//预警申报通知类型
	public static final int MSG_TYPE_NO_CARD = 5;//未刷卡开门通知类型
	public static final int MSG_TYPE_CARD_OVERDUE = 6;//门禁卡到期通知类型
	public static final int MSG_TYPE_DOOR_OPEN = 7;//门长开通知类型
	public static Object EMPTY = new Object();
	public static int LOGIN_TYPE_ID_1 = 1;//流管-综治平台
	public static int CATE_KAI_KA = 1;//开卡
	public static int CATE_XU_KA = 2;//续卡
	public static int CATE_BU_KA = 3;//补卡
	public static int CATE_DROP_YES_KA = 4;//有卡注销，格式化
	public static int CATE_DROP_NO_KA = 5;//无卡注销
	public static int IN_MONTH = 1;
	public static int IN_DAY = 0;

    public static String ERROR_NO_AGENT_AUTH="抱歉,该小区不属于你的管理范围";

}